package com.honglv.controller.admin;

import com.honglv.pojo.dto.UploadRounteDTO;
import com.honglv.pojo.result.Result;
import com.honglv.service.RounteService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController("adminRounteController")
@Slf4j
@RequestMapping("/admin")
@Api("路线相关接口")
public class RounteController {
    @Autowired
    private RounteService rounteService;

    /**
     * 管理员上传路线
     * @param
     * @return
     */
    @PostMapping("/uploadRounte")
    @ApiOperation("上传路线")
    public Result uploadRounte(@RequestBody UploadRounteDTO uploadRounteDTO){
        rounteService.upload(uploadRounteDTO);
        return Result.success();

}}
